<template>
  <div class="mian">
    <!-- 顶部 -->

    <router-view></router-view>
    <!-- 底部 -->
    <van-tabbar v-model="active">
      <van-tabbar-item icon="wap-home-o">首页</van-tabbar-item>
      <van-tabbar-item icon="shop-o">分类</van-tabbar-item>
      <van-tabbar-item
        icon="cart-o"
        :info="goodcount"
      >购物车</van-tabbar-item>
      <van-tabbar-item icon="user-circle-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      active: 0,
    };
  },
  computed: {
    ...mapGetters({
      goodcount: "cart/getAllCount",
    }),
  },
};
</script>
<style lang="scss">
.main {
}
</style>
